home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 23.zip
/
BS1 part 23
/
Amigazette 9.adf
/
Basic
/
Zapp
< prev
next >
Wrap
Text File
|
1991-03-15
|
4KB
|
198 lines
REM
REM (C) Maart 1990 "Zapp" by Courbois Software
REM Fazantlaan 61-63
REM 6641 XW Beuningen
REM Tel : 08897-72546
REM
REM "Zapp" is een onderdeel van de diskette
REM AmiGazette 09 Het dient als ondersteuning
REM van de op die diskette aanwezige cursus.
REM
DECLARE FUNCTION BltBitMap& LIBRARY
DECLARE FUNCTION ViewPortAddress& LIBRARY
DECLARE FUNCTION ldscr& LIBRARY
LIBRARY "ldscr.library"
LIBRARY "graphics.library"
LIBRARY "intuition.library"
SCREEN 3,320,256,4,1
WINDOW 3,,,0,3
PALETTE 1,0,0,0
Xn&=PEEKL(PEEKL(ViewPortAddress&(WINDOW(7))+36)+4)
SCREEN 4,320,256,4,1
WINDOW 4,,,0,4
PALETTE 1,0,0,0
Xv&=PEEKL(PEEKL(ViewPortAddress&(WINDOW(7))+36)+4)
Zapp:
WINDOW 3
WINDOW OUTPUT 4
naam$="SYS:Lo-Res/Pic03"
GOSUB LeesScherm
WINDOW 4
WHILE STRIG(2)<>0:WEND
WHILE STRIG(2)=0:WEND
Start:
WINDOW OUTPUT 3
naam$="SYS:Lo-Res/Pic01"
GOSUB LeesScherm
WINDOW 4
CLS
GOSUB BeweegSchip1
LOCATE 1,1
PRINT "Score : 000000"
Score=0
LOCATE 1,27
PRINT "Schepen : 005"
Aantal=5
Spel:
GOSUB BeweegSchip
GOSUB Vijanden
GOSUB Schieten
IF Aantal=0 THEN Einde
GOTO Spel
Einde:
WINDOW OUTPUT 3
naam$="SYS:Lo-Res/Pic04"
GOSUB LeesScherm
WINDOW 3
WHILE STRIG(2)<>0:WEND
WHILE STRIG(2)=0:WEND
GOTO Zapp
Schieten:
IF STRIG(2)=0 THEN RETURN
IF Schip=0 THEN
REM Omlaag
LINE (154,100)-(156,Omlaag+35),12,bf
GOSUB Wacht
LINE (154,100)-(156,Omlaag+35), 0,bf
x2%=144
y2%=Omlaag+5
GOSUB KleineBoem
Omlaag=0
END IF
IF Schip=4 THEN
REM Rechts
LINE (180,124)-(275-Rechts,126),12,bf
GOSUB Wacht
LINE (180,124)-(275-Rechts,126 ), 0,bf
x2%=280-Rechts
y2%=113
GOSUB KleineBoem
Rechts=0
END IF
IF Schip=8 THEN
REM Omhoog
LINE (154,150)-(156,215-Omhoog),12,bf
GOSUB Wacht
LINE (154,150)-(156,215-Omhoog), 0,bf
x2%=144
y2%=218-Omhoog
GOSUB KleineBoem
Omhoog=0
END IF
IF Schip=12 THEN
REM Links
LINE (130,124)-(Links+35,126),12,bf
GOSUB Wacht
LINE (130,124)-(Links+35,126), 0,bf
x2%=Links+6
y2%=113
GOSUB KleineBoem
Links=0
END IF
RETURN
KleineBoem:
FOR BB=0 TO 5
x1%=289:y1%=BB*33:sx%=32:sy%=32:GOSUB Blitter
GOSUB Wacht
NEXT
LINE (x2%-5,y2%-5)-(x2%+37,y2%+37),0,bf
Score=Score+10
LOCATE 1,1
PRINT "Score : ";RIGHT$("000000"+RIGHT$(STR$(Score),LEN(STR$(Score))-1),6)
RETURN
GroteBoem:
x2%=142
y2%=113
LINE (x2%-19,y2%-19)-(x2%+43,y2%+43),0,bf
FOR BB=0 TO 5
x1%=289:y1%=BB*33:sx%=32:sy%=32:GOSUB Blitter
GOSUB Wacht
NEXT
LINE (x2%-19,y2%-19)-(x2%+43,y2%+43),0,bf
IF Omlaag=60 THEN sx%=23:sy%=37:x2%=148:y2%=Omlaag
IF Omhoog=60 THEN sx%=23:sy%=37:x2%=148:y2%=218-Omhoog
IF Links=90 THEN sx%=37:sy%=23:x2%=1+Links:y2%=116
IF Rechts=90 THEN sx%=37:sy%=23:x2%=280-Rechts:y2%=116
LINE (x2%-4,y2%-4)-(x2%+sx%,y2%+sy%),0,bf
GOSUB BeweegSchip1
LOCATE 1,27
Aantal=Aantal-1
PRINT "Schepen : ";RIGHT$("000"+RIGHT$(STR$(Aantal),LEN(STR$(Aantal))-1),3)
RETURN
Wacht:
FOR WachtLus=0 TO 500
NEXT
RETURN
Vijanden:
Omlaag=Omlaag+1
IF Omlaag=60 THEN GOSUB GroteBoem:Omlaag=0
x1%=256:y1%=38:sx%=23:sy%=37:x2%=148:y2%=Omlaag:GOSUB Blitter
Omhoog=Omhoog+1
IF Omhoog=60 THEN GOSUB GroteBoem:Omhoog=0
x1%=256:y1%=0:sx%=23:sy%=37:x2%=148:y2%=218-Omhoog:GOSUB Blitter
Links=Links+1
IF Links=90 THEN GOSUB GroteBoem:Links=0
x1%=256:y1%=208:sx%=37:sy%=23:x2%=1+Links:y2%=116:GOSUB Blitter
Rechts=Rechts+1
IF Rechts=90 THEN GOSUB GroteBoem:Rechts=0
x1%=256:y1%=232:sx%=37:sy%=23:x2%=280-Rechts:y2%=116:GOSUB Blitter
RETURN
BeweegSchip:
z=STICK(2)
IF z=0 THEN RETURN
IF z= 1 THEN Schip=Schip+1:IF Schip=16 THEN Schip=0
IF z=-1 THEN Schip=Schip-1:IF Schip=-1 THEN Schip=15
BeweegSchip1:
x1%=(Schip-INT(Schip/4)*4)*64
y1%=INT(Schip/4)*64
sx%=62
sy%=62
x2%=128
y2%=96
GOSUB Blitter
RETURN
Blitter:
copy%=BltBitMap&(Xn&,x1%,y1%,Xv&,x2%,y2%,sx%,sy%,200,255,0)
RETURN
LeesScherm:
scherm$=naam$+CHR$(0)
sch&=ldscr& (SADD(scherm$),WINDOW(7))
RETURN